Running Queries
Query Execution
By default, most users elect to have queries auto-run and execute based on each change they make in the interface as they click, drag-and-drop. In some situations, this behavior is not preferred, and the auto-run option is disabled and switched to manual execution mode. This happens either because the user wants to make several changes before the query executes or because the data source is slow, and its quicker to setup the selections in multiple steps, before launching the query. This default behavior can be changed in the user defaults.
When auto-run is active, the button in the ribbon will be toggled on (red square below). Simply click the button to disable auto-run. And vice versa.
To run queries manually click the main application button in the top left corner (red arrow) or push the "F2" key on your keyboard. When the application detects changes to the query that need to be executed, a small yellow lightening bolt will appear in the main execute button (which will also highlight), letting you know you need to run a query.
Auto vs Non-Auto Events
As described above, the auto-run mode will execute a query automatically every time the application detects a change that should change the query - like drop zone selections, measures, calculations and other query functions. Importantly, the heuristic ignores any changes that do NOT require a query change - including formatting and most visualization changes.
There is only one category of changes that is ignored by the auto-run: manual element tree selections. The auto-run will not execute as a user selects items from the element tree, checking or unchecking member elements . Instead, the user will be given a hint that the query needs to run manually as these changes are made (using the large button will light up with the lightening bolt).
Controlling Queries
Beyond determining how and when queries should run, there are several query options found in the query tab that can impact how queries execute. These options are adjusted for each data source as needed. The options include:
- Query Cache: The cache settings determine whether each query is cached on the server.
- Query Settings: A variety of settings that drive the way queries operate - like optimization settings; total settings and sub-querying.
- Query Language: This allows the model metadata and query results to be presented in different languages (irrespective of the application's current language)
- Model Colors and Formats: These settings determine if model defined data colors and value formats are returned in queries and drawn in the visualized results.
Query and Report Reset
The Query reset and its companion Report reset buttons allow the user to revert or clear their currently query selections and changes. These features let the user do a master "undo" in their current Discover report quickly and easily. Click here fore more details on this functionality.